<template>
  <div class="t-import-export-demo">
    <div class="t-import-export-demo-item">
      <h6>导入导出</h6>
      <t-import-export
        ref="imEx"
        :visible="true"
        :instanceCode="instanceCode"
        :importConfig="importConfig"
        :exportConfig="exportConfig"
        :exportConfigMore="exportConfigMore"
        @beforeImport="beforeImport"
        @afterImport="afterImport"
        :beforeImportJSScript="beforeImportJSScript"
        @beforeExport="beforeExport"
        @afterExport="afterExport"
        :beforeExportJSScript="beforeExportJSScript"
        :importBtnName="undefined"
        :exportBtnName="'导出'"
      ></t-import-export>
    </div>

    <div class="t-import-export-demo-item">
      <h6>仅导入</h6>
      <t-import-export
        ref="imEx"
        :visible="true"
        :instanceCode="instanceCode"
        :importConfig="importConfig"
        :exportConfig="null"
        :exportConfigMore="exportConfigMore"
        @beforeImport="beforeImport"
        @afterImport="afterImport"
        :beforeImportJSScript="beforeImportJSScript"
        @beforeExport="beforeExport"
        @afterExport="afterExport"
        :beforeExportJSScript="beforeExportJSScript"
      ></t-import-export>
    </div>

    <div class="t-import-export-demo-item">
      <h6>仅导出</h6>
      <t-import-export
        ref="imEx"
        :visible="true"
        :instanceCode="instanceCode"
        :importConfig="null"
        :exportConfig="exportConfig"
        :exportConfigMore="exportConfigMore"
        @beforeImport="beforeImport"
        @afterImport="afterImport"
        :beforeImportJSScript="beforeImportJSScript"
        @beforeExport="beforeExport"
        @afterExport="afterExport"
        :beforeExportJSScript="beforeExportJSScript"
      ></t-import-export>
    </div>
  </div>
</template>

<script setup>
import { computed, provide, ref } from 'vue';

const executeScript = () => {
  console.log('fasr,executeScript')
}
provide('executeScript', executeScript);
const exportConfigMore = {
  AdvancedFilter:  'var fun = function() {alert(1)}; fun()'
}

  const imEx = ref(null);
  const instanceCode = ref('fasr_import_export080958');
  const beforeImport = () => {};
  const afterImport = () => {};

  const beforeImportJSScript = ref('');
  const beforeExport = (params) => {
    // params.cancel = true
  };
  const afterExport = () => {};

  // const beforeExportJSScript = ref('Widget.fasr_import_export080958.export2()');
  const beforeExportJSScript = ref('');

  const computedStr = computed(() => {
    return { a: 1 };
  });

  // importConfig
  const importConfig = ref({
    ID: 'dec6e0fc-9a1f-f568-d0d7-6aee4af49ad5',
    Code: 'ImportConfig',
    Name: '导入高级设置',
    IsReadOnly: false,
    IsEnum: false,
    IsRef: true,
    IsInternational: true,
    NeedSpecialTreatment: true,
    ValueType: 'String',
    Description: '导入高级设置',
    PropertyEditor: {
      PropertyEditorType: 25,
      ConfigJSON: {
        columnsDefine: {
          ColName: {
            noedit: true,
            Type: 'String',
            mockValue: 'CDO字段',
          },
          ImportRules: {
            Type: 'colSummaryType',
            mockValue: '导入规则',
            dsColSummaryType: [
              {
                value: 0,
                text: '导入',
              },
              {
                value: 1,
                text: '忽略',
              },
              {
                value: 2,
                text: '系统生成',
              },
            ],
          },
          isShow: {
            Type: 'Bool',
            DefaultValue: false,
            mockValue: '是否导入',
          },
          ExcelColName: {
            noedit: false,
            Type: 'String',
            mockValue: 'Excel列名',
          },
          IsRequired: {
            Type: 'Bool',
            DefaultValue: false,
            mockValue: '是否必填',
          },
          IsUnique: {
            Type: 'Bool',
            DefaultValue: false,
            mockValue: '重复性检查',
          },
          Script: {
            Type: 'String',
            mockValue: '规则定义',
            noedit: false,
          },
          Explain: {
            noedit: false,
            Type: 'String',
            mockValue: '填写说明',
          },
          IsHelp: {
            Type: 'Bool',
            DefaultValue: false,
            mockValue: '启用帮助',
          },
          DataSource: {
            Type: 'colLinkFormat',
            mockValue: '选择帮助',
          },
          DisplayField: {
            noedit: false,
            Type: 'String',
            mockValue: '帮助显示字段',
          },
          ValueField: {
            noedit: false,
            Type: 'String',
            mockValue: '帮助值字段',
          },
        },
      },
      Extends: {},
    },
    DefaultValue: '',
    IsRequired: false,
    PropType: 1,
    Level: 0,
    ParentID: '',
    ShowValue: '',
    MappingName_PC: 'importConfig',
    MappingName_Mobile: 'importConfig',
    IsNative: true,
    FasDefaultValue: '',
    Value: '',
    DisplayName: '',
    hide: false,
    CdoSource: {
      Value: {
        ID: 'b13a5a03-0d44-4598-8f1d-7a57501d2f54',
        Code: 'CDO_DO_export_zhangbao1',
        Name: 'CDO_数据对象144933',
        ParentID: '23046344-a8ef-4c3e-b41d-b82d33cee408',
        TypeID: '',
        Layer: 0,
        IsDetail: false,
        SortCode: 1,
        Icon: 'icon-fascdo cdo',
        TreeItemID: 'CDO',
        DataResultType: '',
        MetaDataType: null,
        seqNum: '1.1',
        ActionType: 4,
        Children: [
          {
            ID: 'a75fd07f-2ed3-4fb4-a9cb-5d1c7dd4a2de',
            Code: 'BatchCreateCDO_DO_export_zhangbao1',
            Name: '批量新增CDO_数据对象144933',
            ParentID: 'b13a5a03-0d44-4598-8f1d-7a57501d2f54',
            TypeID: 'Action',
            Layer: 0,
            IsDetail: false,
            SortCode: 0,
            Icon: 'icon-faslogic action',
            TreeItemID: 'Action',
            DataResultType: 'Void',
            MetaDataType: null,
            Children: null,
            seqNum: '1.1.1',
          },
          {
            ID: 'fd3bb585-13f5-4853-8605-bda9650b04da',
            Code: 'BatchDeleteCDO_DO_export_zhangbao1',
            Name: '批量删除CDO_数据对象144933',
            ParentID: 'b13a5a03-0d44-4598-8f1d-7a57501d2f54',
            TypeID: 'Action',
            Layer: 0,
            IsDetail: false,
            SortCode: 0,
            Icon: 'icon-faslogic action',
            TreeItemID: 'Action',
            DataResultType: 'Void',
            MetaDataType: null,
            Children: null,
            seqNum: '1.1.2',
          },
          {
            ID: 'd3b5cdd8-f13b-485f-99a0-b69ae33fcc17',
            Code: 'BatchEditUpdateCDO_DO_export_zhangbao1',
            Name: '批量编辑更新CDO_数据对象144933',
            ParentID: 'b13a5a03-0d44-4598-8f1d-7a57501d2f54',
            TypeID: 'Action',
            Layer: 0,
            IsDetail: false,
            SortCode: 0,
            Icon: 'icon-faslogic action',
            TreeItemID: 'Action',
            DataResultType: 'Void',
            MetaDataType: null,
            Children: null,
            seqNum: '1.1.3',
          },
          {
            ID: '5ce683cf-2f4e-4678-9f39-04fb49800192',
            Code: 'BatchUpdateCDO_DO_export_zhangbao1',
            Name: '批量更新CDO_数据对象144933',
            ParentID: 'b13a5a03-0d44-4598-8f1d-7a57501d2f54',
            TypeID: 'Action',
            Layer: 0,
            IsDetail: false,
            SortCode: 0,
            Icon: 'icon-faslogic action',
            TreeItemID: 'Action',
            DataResultType: 'Void',
            MetaDataType: null,
            Children: null,
            seqNum: '1.1.4',
          },
          {
            ID: '68304738-b6ec-4237-8f52-f2922c00c855',
            Code: 'CreateCDO_DO_export_zhangbao1',
            Name: '创建CDO_数据对象144933',
            ParentID: 'b13a5a03-0d44-4598-8f1d-7a57501d2f54',
            TypeID: 'Action',
            Layer: 0,
            IsDetail: false,
            SortCode: 0,
            Icon: 'icon-faslogic action',
            TreeItemID: 'Action',
            DataResultType: 'Void',
            MetaDataType: null,
            Children: null,
            seqNum: '1.1.5',
          },
          {
            ID: '5a2b24f9-9abf-458a-b312-38380960d7d7',
            Code: 'DeleteCDO_DO_export_zhangbao1',
            Name: '删除CDO_数据对象144933',
            ParentID: 'b13a5a03-0d44-4598-8f1d-7a57501d2f54',
            TypeID: 'Action',
            Layer: 0,
            IsDetail: false,
            SortCode: 0,
            Icon: 'icon-faslogic action',
            TreeItemID: 'Action',
            DataResultType: 'Void',
            MetaDataType: null,
            Children: null,
            seqNum: '1.1.6',
          },
          {
            ID: 'bdd07cee-c37e-4e2f-9b2e-8d338e5cfbc5',
            Code: 'GetCDO_DO_export_zhangbao1',
            Name: '获取CDO_数据对象144933',
            ParentID: 'b13a5a03-0d44-4598-8f1d-7a57501d2f54',
            TypeID: 'Action',
            Layer: 0,
            IsDetail: false,
            SortCode: 0,
            Icon: 'icon-faslogic action',
            TreeItemID: 'Action',
            DataResultType: 'Record',
            MetaDataType: null,
            Children: null,
            seqNum: '1.1.7',
          },
          {
            ID: 'c1e505d0-893c-46c8-9995-7712f77f069d',
            Code: 'UpdateCDO_DO_export_zhangbao1',
            Name: '更新CDO_数据对象144933',
            ParentID: 'b13a5a03-0d44-4598-8f1d-7a57501d2f54',
            TypeID: 'Action',
            Layer: 0,
            IsDetail: false,
            SortCode: 0,
            Icon: 'icon-faslogic action',
            TreeItemID: 'Action',
            DataResultType: 'Void',
            MetaDataType: null,
            Children: null,
            seqNum: '1.1.8',
          },
          {
            ID: '14e3f3f4-3e89-4b73-a7ec-bd3610168ec7',
            Code: 'GetCDO_DO_export_zhangbao1BasicList',
            Name: 'DQ_CDO_数据对象144933',
            ParentID: 'b13a5a03-0d44-4598-8f1d-7a57501d2f54',
            TypeID: '',
            Layer: 0,
            IsDetail: false,
            SortCode: 1,
            Icon: 'icon-fasdq dq',
            TreeItemID: 'DQ',
            DataResultType: '',
            MetaDataType: null,
            Children: null,
            seqNum: '1.1.9',
          },
        ],
        VM: [
          {
            ID: 'dd077d3b-5a8d-49de-b365-f809e176d8b1',
            DisplayName: '.ID',
            RefSchemaExpr: 'Schema.DO.DO_export_zhangbao1.Columns.ID',
            RefSchemaExprValue:
              '{\r\n  "Code": "ID",\r\n  "Text": "主键ID",\r\n  "DataType": "String",\r\n  "DBDataType": "Varchar",\r\n  "Length": 36,\r\n  "Precision": 0,\r\n  "IsNullable": false,\r\n  "IsPkColumn": true,\r\n  "IsFkColumn": false,\r\n  "RelatedDataObjectID": null,\r\n  "RelationType": 0\r\n}',
            Code: 'ID',
            Name: '主键ID',
            ItemType: 8,
            DataResultType: null,
            ValueType: 9,
            HelpInfo: '.ID',
            ExprMetaDataID: 'LocalVars',
            ExprMetaDataAlias: null,
            DataModels: null,
            IsLeaf: true,
            IsDelete: false,
            ExprExt: {
              AttrLength: 36,
              AttrIsRequired: true,
              AttrPrecision: 0,
              AttrDefaultValue: null,
              AttributeType: 0,
              IsTimestamp: false,
              IsSystem: false,
              IsInternational: false,
              IsEnableMasking: false,
              IsEnableColumnPermission: false,
            },
            Children: [],
            ExprFuncItemParamList: [],
          },
          {
            ID: '8a74b232-dd5d-45cf-bd73-d4dd5536d589',
            DisplayName: '.Code',
            RefSchemaExpr: 'Schema.DO.DO_export_zhangbao1.Columns.Code',
            RefSchemaExprValue:
              '{\r\n  "Code": "Code",\r\n  "Text": "编号",\r\n  "DataType": "String",\r\n  "DBDataType": "Varchar",\r\n  "Length": 128,\r\n  "Precision": 0,\r\n  "IsNullable": true,\r\n  "IsPkColumn": false,\r\n  "IsFkColumn": false,\r\n  "RelatedDataObjectID": null,\r\n  "RelationType": 0\r\n}',
            Code: 'Code',
            Name: '编号',
            ItemType: 8,
            DataResultType: null,
            ValueType: 9,
            HelpInfo: '.Code',
            ExprMetaDataID: 'LocalVars',
            ExprMetaDataAlias: null,
            DataModels: null,
            IsLeaf: true,
            IsDelete: false,
            ExprExt: {
              AttrLength: 128,
              AttrIsRequired: false,
              AttrPrecision: 0,
              AttrDefaultValue: null,
              AttributeType: 0,
              IsTimestamp: false,
              IsSystem: false,
              IsInternational: false,
              IsEnableMasking: false,
              IsEnableColumnPermission: false,
            },
            Children: [],
            ExprFuncItemParamList: [],
          },
          {
            ID: 'e53ce241-542d-47c7-9496-617c61bc2132',
            DisplayName: '.Name',
            RefSchemaExpr: 'Schema.DO.DO_export_zhangbao1.Columns.Name',
            RefSchemaExprValue:
              '{\r\n  "Code": "Name",\r\n  "Text": "名称",\r\n  "DataType": "String",\r\n  "DBDataType": "Varchar",\r\n  "Length": 128,\r\n  "Precision": 0,\r\n  "IsNullable": true,\r\n  "IsPkColumn": false,\r\n  "IsFkColumn": false,\r\n  "RelatedDataObjectID": null,\r\n  "RelationType": 0\r\n}',
            Code: 'Name',
            Name: '名称',
            ItemType: 8,
            DataResultType: null,
            ValueType: 9,
            HelpInfo: '.Name',
            ExprMetaDataID: 'LocalVars',
            ExprMetaDataAlias: null,
            DataModels: null,
            IsLeaf: true,
            IsDelete: false,
            ExprExt: {
              AttrLength: 128,
              AttrIsRequired: false,
              AttrPrecision: 0,
              AttrDefaultValue: null,
              AttributeType: 0,
              IsTimestamp: false,
              IsSystem: false,
              IsInternational: false,
              IsEnableMasking: false,
              IsEnableColumnPermission: false,
            },
            Children: [],
            ExprFuncItemParamList: [],
          },
          {
            ID: 'f9ac24d1-b0f6-413d-a104-88fc272a1018',
            DisplayName: '.Creator',
            RefSchemaExpr: 'Schema.DO.DO_export_zhangbao1.Columns.Creator',
            RefSchemaExprValue:
              '{\r\n  "Code": "Creator",\r\n  "Text": "创建人",\r\n  "DataType": "String",\r\n  "DBDataType": "Varchar",\r\n  "Length": 128,\r\n  "Precision": 0,\r\n  "IsNullable": true,\r\n  "IsPkColumn": false,\r\n  "IsFkColumn": false,\r\n  "RelatedDataObjectID": null,\r\n  "RelationType": 0\r\n}',
            Code: 'Creator',
            Name: '创建人',
            ItemType: 8,
            DataResultType: null,
            ValueType: 9,
            HelpInfo: '.Creator',
            ExprMetaDataID: 'LocalVars',
            ExprMetaDataAlias: null,
            DataModels: null,
            IsLeaf: true,
            IsDelete: false,
            ExprExt: {
              AttrLength: 128,
              AttrIsRequired: false,
              AttrPrecision: 0,
              AttrDefaultValue: null,
              AttributeType: 0,
              IsTimestamp: false,
              IsSystem: true,
              IsInternational: false,
              IsEnableMasking: false,
              IsEnableColumnPermission: false,
            },
            Children: [],
            ExprFuncItemParamList: [],
          },
          {
            ID: '86a197b5-6461-4ff2-bc9d-a8bf45bd533b',
            DisplayName: '.CreatorName',
            RefSchemaExpr: 'Schema.DO.DO_export_zhangbao1.Columns.CreatorName',
            RefSchemaExprValue:
              '{\r\n  "Code": "CreatorName",\r\n  "Text": "创建人姓名",\r\n  "DataType": "String",\r\n  "DBDataType": "Varchar",\r\n  "Length": 128,\r\n  "Precision": 0,\r\n  "IsNullable": true,\r\n  "IsPkColumn": false,\r\n  "IsFkColumn": false,\r\n  "RelatedDataObjectID": null,\r\n  "RelationType": 0\r\n}',
            Code: 'CreatorName',
            Name: '创建人姓名',
            ItemType: 8,
            DataResultType: null,
            ValueType: 9,
            HelpInfo: '.CreatorName',
            ExprMetaDataID: 'LocalVars',
            ExprMetaDataAlias: null,
            DataModels: null,
            IsLeaf: true,
            IsDelete: false,
            ExprExt: {
              AttrLength: 128,
              AttrIsRequired: false,
              AttrPrecision: 0,
              AttrDefaultValue: null,
              AttributeType: 0,
              IsTimestamp: false,
              IsSystem: true,
              IsInternational: false,
              IsEnableMasking: false,
              IsEnableColumnPermission: false,
            },
            Children: [],
            ExprFuncItemParamList: [],
          },
          {
            ID: '6e353d1a-352b-4e84-9ed8-1906067b8e95',
            DisplayName: '.CreateTime',
            RefSchemaExpr: 'Schema.DO.DO_export_zhangbao1.Columns.CreateTime',
            RefSchemaExprValue:
              '{\r\n  "Code": "CreateTime",\r\n  "Text": "创建时间",\r\n  "DataType": "DateTime",\r\n  "DBDataType": "DateTime",\r\n  "Length": 8,\r\n  "Precision": 3,\r\n  "IsNullable": true,\r\n  "IsPkColumn": false,\r\n  "IsFkColumn": false,\r\n  "RelatedDataObjectID": null,\r\n  "RelationType": 0\r\n}',
            Code: 'CreateTime',
            Name: '创建时间',
            ItemType: 8,
            DataResultType: null,
            ValueType: 5,
            HelpInfo: '.CreateTime',
            ExprMetaDataID: 'LocalVars',
            ExprMetaDataAlias: null,
            DataModels: null,
            IsLeaf: true,
            IsDelete: false,
            ExprExt: {
              AttrLength: 8,
              AttrIsRequired: false,
              AttrPrecision: 3,
              AttrDefaultValue: null,
              AttributeType: 0,
              IsTimestamp: false,
              IsSystem: true,
              IsInternational: false,
              IsEnableMasking: false,
              IsEnableColumnPermission: false,
            },
            Children: [],
            ExprFuncItemParamList: [],
          },
          {
            ID: 'eca920a5-8964-4806-9cb7-e6273d4e4cd3',
            DisplayName: '.LastModifier',
            RefSchemaExpr: 'Schema.DO.DO_export_zhangbao1.Columns.LastModifier',
            RefSchemaExprValue:
              '{\r\n  "Code": "LastModifier",\r\n  "Text": "最后修改人",\r\n  "DataType": "String",\r\n  "DBDataType": "Varchar",\r\n  "Length": 128,\r\n  "Precision": 0,\r\n  "IsNullable": true,\r\n  "IsPkColumn": false,\r\n  "IsFkColumn": false,\r\n  "RelatedDataObjectID": null,\r\n  "RelationType": 0\r\n}',
            Code: 'LastModifier',
            Name: '最后修改人',
            ItemType: 8,
            DataResultType: null,
            ValueType: 9,
            HelpInfo: '.LastModifier',
            ExprMetaDataID: 'LocalVars',
            ExprMetaDataAlias: null,
            DataModels: null,
            IsLeaf: true,
            IsDelete: false,
            ExprExt: {
              AttrLength: 128,
              AttrIsRequired: false,
              AttrPrecision: 0,
              AttrDefaultValue: null,
              AttributeType: 0,
              IsTimestamp: false,
              IsSystem: true,
              IsInternational: false,
              IsEnableMasking: false,
              IsEnableColumnPermission: false,
            },
            Children: [],
            ExprFuncItemParamList: [],
          },
          {
            ID: 'e9d25f8b-aa71-4478-838b-2a89ecdb35d7',
            DisplayName: '.LastModifierName',
            RefSchemaExpr:
              'Schema.DO.DO_export_zhangbao1.Columns.LastModifierName',
            RefSchemaExprValue:
              '{\r\n  "Code": "LastModifierName",\r\n  "Text": "最后修改人姓名",\r\n  "DataType": "String",\r\n  "DBDataType": "Varchar",\r\n  "Length": 128,\r\n  "Precision": 0,\r\n  "IsNullable": true,\r\n  "IsPkColumn": false,\r\n  "IsFkColumn": false,\r\n  "RelatedDataObjectID": null,\r\n  "RelationType": 0\r\n}',
            Code: 'LastModifierName',
            Name: '最后修改人姓名',
            ItemType: 8,
            DataResultType: null,
            ValueType: 9,
            HelpInfo: '.LastModifierName',
            ExprMetaDataID: 'LocalVars',
            ExprMetaDataAlias: null,
            DataModels: null,
            IsLeaf: true,
            IsDelete: false,
            ExprExt: {
              AttrLength: 128,
              AttrIsRequired: false,
              AttrPrecision: 0,
              AttrDefaultValue: null,
              AttributeType: 0,
              IsTimestamp: false,
              IsSystem: true,
              IsInternational: false,
              IsEnableMasking: false,
              IsEnableColumnPermission: false,
            },
            Children: [],
            ExprFuncItemParamList: [],
          },
          {
            ID: 'f131f8c1-f587-4f02-9d76-1703d5308811',
            DisplayName: '.LastModifyTime',
            RefSchemaExpr:
              'Schema.DO.DO_export_zhangbao1.Columns.LastModifyTime',
            RefSchemaExprValue:
              '{\r\n  "Code": "LastModifyTime",\r\n  "Text": "最后修改时间",\r\n  "DataType": "Timestamp",\r\n  "DBDataType": "Timestamp",\r\n  "Length": 8,\r\n  "Precision": 3,\r\n  "IsNullable": true,\r\n  "IsPkColumn": false,\r\n  "IsFkColumn": false,\r\n  "RelatedDataObjectID": null,\r\n  "RelationType": 0\r\n}',
            Code: 'LastModifyTime',
            Name: '最后修改时间',
            ItemType: 8,
            DataResultType: null,
            ValueType: 6,
            HelpInfo: '.LastModifyTime',
            ExprMetaDataID: 'LocalVars',
            ExprMetaDataAlias: null,
            DataModels: null,
            IsLeaf: true,
            IsDelete: false,
            ExprExt: {
              AttrLength: 8,
              AttrIsRequired: false,
              AttrPrecision: 3,
              AttrDefaultValue: null,
              AttributeType: 0,
              IsTimestamp: true,
              IsSystem: true,
              IsInternational: false,
              IsEnableMasking: false,
              IsEnableColumnPermission: false,
            },
            Children: [],
            ExprFuncItemParamList: [],
          },
        ],
      },
      ShowValue: 'CDO_数据对象144933',
    },
    Columns: {
      Value: [
        {
          ColName: 'ID',
          ExcelColName: '主键ID',
          caption: '主键ID',
          DataSource: '',
          DisplayField: '',
          ValueField: '',
          IsRequired: false,
          isShow: true,
          IsUnique: false,
          IsHelp: false,
          IsHelpReplace: false,
          ImportRules: 0,
          need: true,
          ValueInfo_caption: {
            ShowValue: '主键ID',
            ReferenceExpr: 'Schema.DO.DO_export_zhangbao1.Columns.ID.Text',
            Type: 0,
          },
          ValueInfo_ExcelColName: {
            ShowValue: '主键ID',
            ReferenceExpr: 'Schema.DO.DO_export_zhangbao1.Columns.ID.Text',
            Type: 0,
          },
        },
        {
          ColName: 'Code',
          ExcelColName: '编号',
          caption: '编号',
          DataSource: '',
          DisplayField: '',
          ValueField: '',
          IsRequired: false,
          isShow: true,
          IsUnique: false,
          IsHelp: false,
          IsHelpReplace: false,
          ImportRules: 0,
          need: true,
          ValueInfo_caption: {
            ShowValue: '编号',
            ReferenceExpr: 'Schema.DO.DO_export_zhangbao1.Columns.Code.Text',
            Type: 0,
          },
          ValueInfo_ExcelColName: {
            ShowValue: '编号',
            ReferenceExpr: 'Schema.DO.DO_export_zhangbao1.Columns.Code.Text',
            Type: 0,
          },
        },
        {
          ColName: 'Name',
          ExcelColName: '名称',
          caption: '名称',
          DataSource: '',
          DisplayField: '',
          ValueField: '',
          IsRequired: false,
          isShow: true,
          IsUnique: false,
          IsHelp: false,
          IsHelpReplace: false,
          ImportRules: 0,
          need: true,
          ValueInfo_caption: {
            ShowValue: '名称',
            ReferenceExpr: 'Schema.DO.DO_export_zhangbao1.Columns.Name.Text',
            Type: 0,
          },
          ValueInfo_ExcelColName: {
            ShowValue: '名称',
            ReferenceExpr: 'Schema.DO.DO_export_zhangbao1.Columns.Name.Text',
            Type: 0,
          },
        },
      ],
    },
    MaxRows: 5000,
    ImportStrategy: 1,
    defineDataSocurce: [
      {
        ColName: 'ID',
        ExcelColName: '主键ID',
        caption: '主键ID',
        DataSource: '',
        DisplayField: '',
        ValueField: '',
        IsRequired: false,
        isShow: true,
        IsUnique: false,
        IsHelp: false,
        IsHelpReplace: false,
        ImportRules: 0,
        need: true,
        ValueInfo_caption: {
          ShowValue: '主键ID',
          ReferenceExpr: 'Schema.DO.DO_export_zhangbao1.Columns.ID.Text',
          Type: 0,
        },
        ValueInfo_ExcelColName: {
          ShowValue: '主键ID',
          ReferenceExpr: 'Schema.DO.DO_export_zhangbao1.Columns.ID.Text',
          Type: 0,
        },
      },
      {
        ColName: 'Code',
        ExcelColName: '编号',
        caption: '编号',
        DataSource: '',
        DisplayField: '',
        ValueField: '',
        IsRequired: false,
        isShow: true,
        IsUnique: false,
        IsHelp: false,
        IsHelpReplace: false,
        ImportRules: 0,
        need: true,
        ValueInfo_caption: {
          ShowValue: '编号',
          ReferenceExpr: 'Schema.DO.DO_export_zhangbao1.Columns.Code.Text',
          Type: 0,
        },
        ValueInfo_ExcelColName: {
          ShowValue: '编号',
          ReferenceExpr: 'Schema.DO.DO_export_zhangbao1.Columns.Code.Text',
          Type: 0,
        },
      },
      {
        ColName: 'Name',
        ExcelColName: '名称',
        caption: '名称',
        DataSource: '',
        DisplayField: '',
        ValueField: '',
        IsRequired: false,
        isShow: true,
        IsUnique: false,
        IsHelp: false,
        IsHelpReplace: false,
        ImportRules: 0,
        need: true,
        ValueInfo_caption: {
          ShowValue: '名称',
          ReferenceExpr: 'Schema.DO.DO_export_zhangbao1.Columns.Name.Text',
          Type: 0,
        },
        ValueInfo_ExcelColName: {
          ShowValue: '名称',
          ReferenceExpr: 'Schema.DO.DO_export_zhangbao1.Columns.Name.Text',
          Type: 0,
        },
      },
    ],
  });
const exportConfig = `{ "ID": "9bcc5a37-ea15-23e4-156a-88de2d41d2ba", "Code": "ExportConfig", "Name": "导出高级设置", "IsReadOnly": false, "IsEnum": false, "IsRef": true, "IsInternational": true, "NeedSpecialTreatment": true, "ValueType": "String", "Description": "导出高级设置", "PropertyEditor": { "PropertyEditorType": 26, "ConfigJSON": { "columnsDefine": { "ColName": { "noedit": true, "Type": "String", "mockValue": "字段名称" }, "ExcelColName": { "noedit": false, "Type": "String", "mockValue": "Excel列名称" }, "isShow": { "PropType": 0, "default": true, "Type": "Bool", "mockValue": "是否导出" } } }, "Extends": {} }, "DefaultValue": "", "IsRequired": false, "PropType": 1, "Level": 0, "ParentID": "", "ShowValue": "", "MappingName_PC": "", "MappingName_Mobile": "", "IsNative": true, "FasDefaultValue": "", "Value": "", "DisplayName": "", "hide": false, "ExportPageSize": 1000, "DataSource": { "ActionID": "14e3f3f4-3e89-4b73-a7ec-bd3610168ec7", "ActionCode": "GetCDO_DO_export_zhangbao1BasicList", "Parameters": [ { "ParamType": 0, "ParameterName": "DefaultInputFilter", "ParameterValue": null }, { "ParamType": 0, "ParameterName": "PageIndex", "ParameterValue": null }, { "ParamType": 0, "ParameterName": "PageSize", "ParameterValue": null }, { "ParamType": 0, "ParameterName": "AdvancedFilter", "ParameterValue": null }, { "ParamType": 0, "ParameterName": "AdvancedSort", "ParameterValue": null } ], "ActionType": 3, "ExportType": 0 },
  "Columns": [
    { "isShow": false, "ColName": "ID", "ExcelColName": "主键ID", "DataType": "String", "ValueInfo_ColName": { "ShowValue": "ID", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.ID.Code", "Type": 0 }, "ValueInfo_ExcelColName": { "ShowValue": "主键ID", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.ID.Text", "Type": 0 } },
    { "isShow": true, "ColName": "Code", "ExcelColName": "编号", "DataType": "String", "ValueInfo_ColName": { "ShowValue": "Code", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.Code.Code", "Type": 0 }, "ValueInfo_ExcelColName": { "ShowValue": "编号", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.Code.Text", "Type": 0 } },
    { "isShow": false, "ColName": "Name", "ExcelColName": "名称", "DataType": "String", "ValueInfo_ColName": { "ShowValue": "Name", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.Name.Code", "Type": 0 }, "ValueInfo_ExcelColName": { "ShowValue": "名称", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.Name.Text", "Type": 0 } },
  { "isShow": true, "ColName": "Creator", "ExcelColName": "创建人", "DataType": "String", "ValueInfo_ColName": { "ShowValue": "Creator", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.Creator.Code", "Type": 0 }, "ValueInfo_ExcelColName": { "ShowValue": "创建人", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.Creator.Text", "Type": 0 } },
    { "isShow": true, "ColName": "CreateTime", "ExcelColName": "创建时间", "DataType": "DateTime", "ValueInfo_ColName": { "ShowValue": "CreateTime", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.CreateTime.Code", "Type": 0 }, "ValueInfo_ExcelColName": { "ShowValue": "创建时间", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.CreateTime.Text", "Type": 0 } },

    { "isShow": false, "ColName": "LastModifierName", "ExcelColName": "最后修改人姓名", "DataType": "String", "ValueInfo_ColName": { "ShowValue": "LastModifierName", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.LastModifierName.Code", "Type": 0 }, "ValueInfo_ExcelColName": { "ShowValue": "最后修改人姓名", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.LastModifierName.Text", "Type": 0 } },
    { "isShow": false, "ColName": "LastModifier", "ExcelColName": "最后修改人", "DataType": "String", "ValueInfo_ColName": { "ShowValue": "LastModifier", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.LastModifier.Code", "Type": 0 }, "ValueInfo_ExcelColName": { "ShowValue": "最后修改人", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.LastModifier.Text", "Type": 0 } },
    { "isShow": false, "ColName": "LastModifyTime", "ExcelColName": "最后修改时间", "DataType": "Timestamp", "ValueInfo_ColName": { "ShowValue": "LastModifyTime", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.LastModifyTime.Code", "Type": 0 }, "ValueInfo_ExcelColName": { "ShowValue": "最后修改时间", "ReferenceExpr": "Schema.DQ.GetCDO_DO_export_zhangbao1BasicList.Sources.DO_export_zhangbao1.Columns.LastModifyTime.Text", "Type": 0 } }
  ]
}`;
</script>

<style scoped lang="scss">
.t-import-export-demo {
  padding-left: 16px;
}
.t-import-export-demo-item {
  display: flex;
  align-items: center;
  h6 {
    margin: 12px 12px 12px 0;
  }
}
</style>
